# -*- coding:utf-8 -*-
from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import dialogOperationConstants

class DialogOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(DialogOperationSubDirectiveTree, self).__init__(parent)
        self.createDialogOperationSubTreeNode()

    def createDialogOperationSubTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "dialogOperation"
        self.setText(0, "对话框操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningInfoDialogDirective, "打开信息对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningInputDialogDirective, "打开输入对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningDatetimeDialogDirective, "打开日期时间对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningOptionDialogDirective, "打开选择对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningFileDialogDirective, "打开选择文件对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningFileFolderDialogDirective,
                            "打开选择文件夹对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningDataTableDialogDirective,
                            "打开数据表格对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.openningCustomDialogDirective,
                            "打开自定义对话框")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, dialogOperationConstants.DialogOperationConstants.informingMessageDialogDirective,
                            "消息通知")
